package com.zhonghui.scm.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zhonghui.scm.mapper.ScmPurchasingContractMapper;
import com.zhonghui.scm.domain.vo.ScmPurchasingContractVo;
import com.zhonghui.scm.service.IScmPurchasingContractService;

/**
 * 供应链SCM-采购管理-采购合同Service业务层处理
 * 
 * @author qiezhi
 * @date 2023-12-20
 */
@Service
public class ScmPurchasingContractServiceImpl implements IScmPurchasingContractService 
{
    @Autowired
    private ScmPurchasingContractMapper scmPurchasingContractMapper;

    /**
     * 查询供应链SCM-采购管理-采购合同
     * 
     * @param id 供应链SCM-采购管理-采购合同主键
     * @return 供应链SCM-采购管理-采购合同
     */
    @Override
    public ScmPurchasingContractVo selectScmPurchasingContractById(Long id)
    {
        return scmPurchasingContractMapper.selectScmPurchasingContractById(id);
    }

    /**
     * 查询供应链SCM-采购管理-采购合同列表
     * 
     * @param scmPurchasingContract 供应链SCM-采购管理-采购合同
     * @return 供应链SCM-采购管理-采购合同
     */
    @Override
    public List<ScmPurchasingContractVo> selectScmPurchasingContractList(ScmPurchasingContractVo scmPurchasingContract)
    {
        return scmPurchasingContractMapper.selectScmPurchasingContractList(scmPurchasingContract);
    }

    /**
     * 新增供应链SCM-采购管理-采购合同
     * 
     * @param scmPurchasingContract 供应链SCM-采购管理-采购合同
     * @return 结果
     */
    @Override
    public int insertScmPurchasingContract(ScmPurchasingContractVo scmPurchasingContract)
    {
        return scmPurchasingContractMapper.insertScmPurchasingContract(scmPurchasingContract);
    }

    /**
     * 修改供应链SCM-采购管理-采购合同
     * 
     * @param scmPurchasingContract 供应链SCM-采购管理-采购合同
     * @return 结果
     */
    @Override
    public int updateScmPurchasingContract(ScmPurchasingContractVo scmPurchasingContract)
    {
        return scmPurchasingContractMapper.updateScmPurchasingContract(scmPurchasingContract);
    }

    /**
     * 批量删除供应链SCM-采购管理-采购合同
     * 
     * @param ids 需要删除的供应链SCM-采购管理-采购合同主键
     * @return 结果
     */
    @Override
    public int deleteScmPurchasingContractByIds(Long[] ids)
    {
        return scmPurchasingContractMapper.deleteScmPurchasingContractByIds(ids);
    }

    /**
     * 删除供应链SCM-采购管理-采购合同信息
     * 
     * @param id 供应链SCM-采购管理-采购合同主键
     * @return 结果
     */
    @Override
    public int deleteScmPurchasingContractById(Long id)
    {
        return scmPurchasingContractMapper.deleteScmPurchasingContractById(id);
    }
}
